/**
 *  @file Process.h
 */
#ifndef _PROCESS_H_
#define _PROCESS_H_

#include "../common/BaseObject.h"
#include "../collections/ListT.h"

namespace cppflib
{

namespace os
{

class _DLLAPI Process : public BaseObject
{
private:
   ptr_t hProcess;

private:
   Process();
   explicit Process(ptr_t hProcess);
   void Close();

public:
   virtual ~Process(void);
   bool WaitForExit(u32_t &exitCode);
   bool WaitForExit(int timeout, u32_t &exitCode);
   u32_t GetProcId(void);

   PUBLIC Process *RunProc(pcwstr_t exePath);
   PUBLIC Process *RunProc(pcwstr_t exePath, pcwstr_t args);
   PUBLIC Process *RunProc(pcwstr_t exePath, collections::ListT<pcwstr_t> &argList);
};

}  // end of namespace os


}  // end of namespace cppflib


#endif
